package com.ruoyi.ruonorder.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.ruonorder.service.IOrderInfoService;
import com.ruoyi.common.core.web.controller.BaseController;


/**
 * 抢单功能Controller
 * 
 * @author ruoyi
 * @date 2024-08-22
 */
@RestController
@RequestMapping("/runonorder")
public class OrderInfoController extends BaseController
{
    @Autowired
    private IOrderInfoService orderInfoService;


    /**
     *司机抢单
     */
    @PostMapping("/assignOrder/{id}")
    public AjaxResult assignOrder(@PathVariable(name = "id")Long id){
        return orderInfoService.assignOrder(id);
    }

}
